package io.renren.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.dao.UnitsDao;
import io.renren.dto.UnitsDTO;
import io.renren.entity.UnitsEntity;
import io.renren.service.UnitsService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * ${comments}
 *
 * @author Sen 524227263@qq.com
 * @since 1.0.0 2024-05-30
 */
@Service
public class UnitsServiceImpl extends CrudServiceImpl<UnitsDao, UnitsEntity, UnitsDTO> implements UnitsService {

    @Override
    public QueryWrapper<UnitsEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<UnitsEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}